<%-- 
    Document   : user-add
    Created on : 20 janv. 2012, 11:08:27
    Author     : Thierry
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="/header.jsp" />
<%
    pageContext.setAttribute("listAdh", request.getAttribute("listAdherents"));
%>

<h2>Ajouter un utilisateur</h2>

<form method="post" name="addForm" action="addForm">
    <% String message = (String) request.getAttribute("message");
      if (message != null) { %>
        <%=message%>
    <% } %>
    <table id="panel" border="0" cellpadding="5" cellspacing="5">
        <tbody>
        <tr>
            <td><label for="user">Nom d'utilisateur</label></td>
            <td><input id="user" name="user" type="text" value="" /></td>
        </tr>
        <tr>
            <td><label for="pass">Mot de passe</label></td>
            <td><input id="pass" name="pass" type="password" value="" /></td>
        </tr>
        <tr>
            <td><label for="adherent">Membre</label></td>
            <td><select name="adherent">
                    <c:forEach var="adh" items="${listAdh}" >
                        <option value="${adh.idAdherent}">${adh.nom} ${adh.prenom}</option>
                    </c:forEach>
                </select>
            </td>
        </tr>
        <tr>
            <td><label for="level">Droit</label></td>
            <td><select name="level"><option name="Direction">Direction</option><option name="Capitaine">Capitaine</option><option name="Joueur">Joueur</option></select></td>
        </tr>
        </tbody>
        <tfoot>
        <tr>
            <td colspan="2">
                <input id="submit" name="submit" type="submit" value="Ajouter" />
            </td>
        </tr>
        </tfoot>
    </table>
</form>

<jsp:include page="/footer.jsp" />